using HarmonyLib;
using UnityEngine;

namespace TheWorldOfKongfuEasyMod;

[HarmonyPatch(typeof(StatusMainController))]
[HarmonyPatch("OnButtonClick")]
public static class Patch_StatusMainController_OnButtonClick
{
    static bool Prefix(ref StatusMainController __instance, GameObject go)
    {
        var mPackageController = SharedData.Instance(false).m_PackageController;
        var equipBtnData = mPackageController.gameObject.GetComponent<EquipBtnData>();
        if (!equipBtnData)
        {
            equipBtnData = mPackageController.gameObject.AddComponent<EquipBtnData>();
        }

        return true;
    }
}